package cn.tony.buildsrc


object App {
    const val compileSdk = 31
    const val minSdk = 26
    const val targetSdk = 31
    const val versionCode = 1
    const val versionName = "1.0"
}

object Libs {
    const val androidGradlePlugin = "com.android.tools.build:gradle:7.0.3"

    object Kotlin {
        private const val version = "1.5.31"
        const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
        const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
        const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
    }

    object OkHttp {
        private const val version = "4.9.1"
        const val okhttp = "com.squareup.okhttp3:okhttp:$version"
        const val logging = "com.squareup.okhttp3:logging-interceptor:$version"
    }


    object AndroidX {
        const val appcompat = "androidx.appcompat:appcompat:1.3.0"
        const val coreKtx = "androidx.core:core-ktx:1.7.0"
        const val material = "com.google.android.material:material:1.3.0"
        const val constraintlayout = "androidx.constraintlayout:constraintlayout:2.0.4"
    }

    object Lifecycle {
        private const val version = "2.4.0"

        // Lifecycles only (without ViewModel or LiveData)
        const val lifecycle = "androidx.lifecycle:lifecycle-runtime-ktx:$version"
        const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:$version"
        const val viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:$version"
        const val livedata = "androidx.lifecycle:lifecycle-livedata-ktx:$version"


        // Saved state module for ViewModel
        const val savedState = "androidx.lifecycle:lifecycle-viewmodel-savedstate:$version"

        // Annotation processor     kapt(Versions.com.tony.Libs.lifecycleProcessor)
        const val lifecycleProcessor = "androidx.lifecycle:lifecycle-compiler:$version"

        // alternately - if using Java8, use the following instead of lifecycle-compiler
        const val lifecycleCommonJava8 = "androidx.lifecycle:lifecycle-common-java8:$version"

        // optional - helpers for implementing LifecycleOwner in a Service
        const val lifecycleService = "androidx.lifecycle:lifecycle-service:$version"

        // optional - ProcessLifecycleOwner provides a lifecycle for the whole application process
        const val lifecycleProcess = "androidx.lifecycle:lifecycle-process:$version"

    }

    object Room {
        private const val version = "2.3.0"
        const val runtime = "androidx.room:room-runtime:$version"
        const val ktx = "androidx.room:room-ktx:$version"
        const val compiler = "androidx.room:room-compiler:$version"
    }

    object Test {
        private const val version = "1.4.0"
        const val core = "androidx.test:core:$version"
        const val rules = "androidx.test:rules:$version"

        object Ext {
            private const val version = "1.1.2"
            const val junit = "androidx.test.ext:junit-ktx:$version"
        }

        const val espressoCore = "androidx.test.espresso:espresso-core:3.2.0"

        const val junit = "junit:junit:4.13"
    }

}